<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="jsp/per/common/common_taglib.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>login.jsp</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  	
  	获取当前登录用户的用户名:
  	<sec:authentication property="name"/><br/>
  	
  	<hr/>
  	
  	获取当前登录用户的所以权限:<br/>
  	<sec:authentication property="authorities" var="authorities" scope="page"/>
  	
		<c:forEach items="${authorities}" var="authority">
		  ${authority.authority}<br/>
		</c:forEach>
  	
  <hr/>
  
  	<sec:authorize ifNotGranted="ROLE_ADMIN">
	 	普通用户
	</sec:authorize>
	
  	<br/><br/><br/><br/>
  	
  	<sec:authorize ifAnyGranted="ROLE_ADMIN">
	 	管理员用户
	</sec:authorize>
	
	<hr/>
	
	<a href="${pageContext.request.contextPath}/user/user!queryMenus.do">查看菜单</a>
	
	<a>退出</a>
  		
  </body>
</html>
